#!/usr/bin/python3
# -*- coding: utf-8 -*-



import rospy
from tf.msg import tfMessage
import time
from sensor_msgs.msg import LaserScan

pub = rospy.Publisher('/horizontal_laser_2d', LaserScan, queue_size=1)
val = LaserScan()

if_print = True

def callback(data):
  print(data.header)
  val = data
  global if_print
  if if_print:
    # print(data)
    if_print = False
  exit()

def main():
  rospy.init_node('change_bag_imu')
  rospy.Subscriber('/scan', LaserScan, callback)
  rospy.spin()

if __name__ == '__main__':
  main()
